<?php

/**
 * 控制器
 */
class GuestbookController extends \Our\Controller_AbstractAdmin
{
    /**
     * 列表页
     */
    public function indexAction()
    {
        $page = $this->_getParam('page', 1);
        $count = $this->_getParam('count', 12);

        $where = $this->_getWhere();

        $GuestbookModel = \Guestbook\GuestbookModel::getInstance();
        list($result, $paginator) = $GuestbookModel->getList([
            'page' => $page,
            'count' => $count,
            'where' => $where,
            'baseUrl' => $this->_getBaseUrl()
        ]);

        $this->getView()->assign('paginator', $paginator);
        $this->getView()->assign('listData', $result);
    }

}
